<template>
	<view class="goods-detail-module" v-if="detail">
		<view class="goods-price-wrapper">
			<view class="goods-price">
				￥{{detail.retail_price}} <text class="original-price" v-if="detail.false_price">￥{{detail.false_price}}</text>
			</view>
			<view class="goods-sales-volume">
				销量：{{detail.sales>999?'999+':detail.sales}}
			</view>
		</view>
		<view class="goods-name">
			{{detail.name}}
		</view>
		<view class="goods-desc">
			{{detail.dec}}
		</view>
		<view class="goods-inventory">
			库存：{{detail.inventory}}
		</view>
		<view class="goods-views-count">
			预览：{{detail.pv}}
		</view>
	</view>
</template>

<script lang="ts" setup>
	import { defineProps } from 'vue';
	
	interface IProps {
		detail : IGoods | null
	}
	
	const props = withDefaults(defineProps<IProps>(), {
		detail: null
	})
</script>

<style scoped lang="scss">
	@import "./goodsDetailModule.scss";
</style>